import { createApp } from 'vue'
import pinia from './stores'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import './styles/index.scss'
import ElSvg from './components/SvgIcon/ElSvg'
import './permission'
import Catgory from '@/components/Catgory/index.vue'

import {directives} from  '@/utils/directives'

import '@/mock/mockServe'

import ECharts from 'vue-echarts'


const app = createApp(App)
directives(app)
//注册全局组件
app.component(Catgory.name,Catgory)
app.component('v-chart',ECharts)


ElSvg(app)
app.use(pinia)
  .use(router)
  .use(ElementPlus, {
    locale: zhCn,
  })
  .mount('#app')
